package main

import "fmt"

func main() {
	fmt.Println(maxAndMin(1, 2))
}

func maxAndMin(a, b int) (max, min int) {
	if a > b {
		max = a
		min = b
	} else {
		max = b
		min = a
	}
	return max, min
}

// 变量赋值，直接return
func maxAndMin2(a, b int) (max, min int) {
	if a > b {
		max = a
		min = b
	} else {
		max = b
		min = a
	}
	return
}
